import request from '@/utils/request'

// 查询待处理隐患台账列表
export function listRisk(query) {
  return request({
    url: '/business/risk/list',
    method: 'get',
    params: query
  })
}

// 查询待处理隐患台账详细
export function getRisk(id) {
  return request({
    url: '/business/risk/' + id,
    method: 'get'
  })
}

// 新增待处理隐患台账
export function addRisk(data) {
  return request({
    url: '/business/risk',
    method: 'post',
    data: data
  })
}

// 修改待处理隐患台账
export function updateRisk(data) {
  return request({
    url: '/business/risk',
    method: 'put',
    data: data
  })
}

// 删除待处理隐患台账
export function delRisk(id) {
  return request({
    url: '/business/risk/' + id,
    method: 'delete'
  })
}
  // 查询确认的隐患台账列表
  export function listRiskConfirm(query) {
    return request({
      url: '/business/risk/confirmlist',
      method: 'get',
      params: query
    })
}
